import { ActionConstant } from '../actions/search_action';
import { initState } from '../reducers/search_reducer'
import { Map } from 'immutable'

export default function input(state, action) {
    switch(action.type) {
        case ActionConstant.type_editor_input:
            return state.set('input_text', action.value);
            break;
        default:
            if(!state)
                return Map(initState.input);
            return state;
    }
}